
#ifndef _MEMBER_BAction_H_
#define _MEMBER_BAction_H_

#include <BIcon>
#include <BStyle>
#include <BWidget>
#include <BLayout>
#include <BSpring>
#include <BAction>

#define action_member(action)	((member_BAction*)((BAction*)action)->_ptr)

namespace BWE
{
	class member_BAction
	{
	public:
		member_BAction(BAction* action);
		~member_BAction();

		bool able() const
		{
			if (widget)
				return widget->able();
			return false;
		}
		void translate(const BStyle* style);

		BAction*		boss;
		BWidget*		host;
		BIconHolder		icon;
		BString			text;
		BWidgetHolder	widget;
		BLayoutHolder	layout;
		bool			checkable;
		bool			checked;

		bool			dirty;
		BString			t_text;
		BSize			sizeHint;
		BRect			rect;
		BSize			iconSize;
		BRect			iconRect;
		BSize			textSize;
		BRect			textRect;
		BRect			separatorRect;
	};
}

#endif